package server;

import java.io.IOException;
import java.net.ServerSocket;

import javax.net.ServerSocketFactory;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLServerSocketFactory;

public class FakeServer extends Thread {

	public static void main(String[] args) {
		System.setProperty("javax.net.ssl.trustStore",
				"Certificates/FSERVERSTORE");
		System.setProperty("javax.net.ssl.trustStorePassword", "password");
		System
				.setProperty("javax.net.ssl.keyStore",
						"Certificates/FSERVERSTORE");
		System.setProperty("javax.net.ssl.keyStorePassword", "password");
		int port = 25656;
		ServerSocketFactory ssf = SSLServerSocketFactory.getDefault();
		ServerSocket server = null;
		try {
			server = ssf.createServerSocket(port);
			((SSLServerSocket) server).setNeedClientAuth(false);
		} catch (IOException e1) {
			e1.printStackTrace();
		}
		new OJDSServer(server);
	}

}
